package com.authService.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 系统菜单表
 * </p>
 *
 * @author xiaopeng
 * @since 2024-09-08
 */
@Getter
@Setter
@TableName("sys_menu")
public class SysMenuEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "菜单ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "菜单名称")
    private String menuName;

    @Schema(description = "菜单编号， 根据层级关系自动生成")
    @TableField("menu_code")
    private String menuCode;

    @Schema(description = "父菜单ID")
    private Long parentId;

    @Schema(description = "显示顺序")
    private Integer orderNum;

    @Schema(description = "路由地址")
    private String path;

    @Schema(description = "路由参数")
    private String query;

    @Schema(description = "是否缓存（0缓存 1不缓存）")
    private Integer isCache;

    @Schema(description = "菜单类型（1-目录 2-菜单）")
    private Integer menuType;

    @Schema(description = "启用状态（true启用 false禁用）")
    private Boolean enableStatus;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "是否软删除 0:未删除 1:删除")
    @TableLogic
    private Integer isDeleted;

    @Schema(description = "创建人")
    private Long createBy;

    @Schema(description = "修改人")
    private Long updateBy;

    @Schema(description = "创建人")
    private String createByName;

    @Schema(description = "修改人")
    private String updateByName;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    private LocalDateTime updateTime;
}
